namespace VAdvantage.Model
{

/** Generated Model - DO NOT CHANGE */
using System;
using System.Text;
using VAdvantage.DataBase;
using VAdvantage.Common;
using VAdvantage.Classes;
using VAdvantage.Process;
using VAdvantage.Model;
using VAdvantage.Utility;
using System.Data;
/** Generated Model for VTTable
 *  @author Jagmohan Bhatt (generated) 
 *  @version Vienna Framework 1.1.1 - $Id$ */
public class X_VTTable : PO
{
public X_VTTable (Context ctx, int VTTable_ID, String trxName) : base (ctx, VTTable_ID, trxName)
{
/** if (VTTable_ID == 0)
{
SetVTTable_ID (0);
}
 */
}
public X_VTTable (Ctx ctx, int VTTable_ID, String trxName) : base (ctx, VTTable_ID, trxName)
{
/** if (VTTable_ID == 0)
{
SetVTTable_ID (0);
}
 */
}
/** Load Constructor 
@param ctx context
@param rs result set 
@param trxName transaction
*/
public X_VTTable (Context ctx, DataRow rs, String trxName) : base(ctx, rs, trxName)
{
}
/** Load Constructor 
@param ctx context
@param rs result set 
@param trxName transaction
*/
public X_VTTable (Ctx ctx, DataRow rs, String trxName) : base(ctx, rs, trxName)
{
}
/** Load Constructor 
@param ctx context
@param rs result set 
@param trxName transaction
*/
public X_VTTable (Ctx ctx, IDataReader dr, String trxName) : base(ctx, dr, trxName)
{
}
/** Static Constructor 
 Set Table ID By Table Name
 added by ->Harwinder */
static X_VTTable()
{
 Table_ID = Get_Table_ID(Table_Name);
 model = new KeyNamePair(Table_ID,Table_Name);
}
/** Serial Version No */
static long serialVersionUID = 27562514384835L;
/** Last Updated Timestamp 7/29/2010 1:07:48 PM */
public static long updatedMS = 1280389068046L;
/** AD_Table_ID=1000016 */
public static int Table_ID;
 // =1000016;

/** TableName=VTTable */
public static String Table_Name="VTTable";

protected static KeyNamePair model;
protected Decimal accessLevel = new Decimal(7);
/** AccessLevel
@return 7 - System - Client - Org 
*/
protected override int Get_AccessLevel()
{
return Convert.ToInt32(accessLevel.ToString());
}
/** Load Meta Data
@param ctx context
@return PO Info
*/
protected override POInfo InitPO (Context ctx)
{
POInfo poi = POInfo.GetPOInfo (ctx, Table_ID);
return poi;
}
/** Load Meta Data
@param ctx context
@return PO Info
*/
protected override POInfo InitPO (Ctx ctx)
{
POInfo poi = POInfo.GetPOInfo (ctx, Table_ID);
return poi;
}
/** Info
@return info
*/
public override String ToString()
{
StringBuilder sb = new StringBuilder ("X_VTTable[").Append(Get_ID()).Append("]");
return sb.ToString();
}
/** Set VTSysEleAccount.
@param VTSysEleAccount VTSysEleAccount */
public void SetVTSysEleAccount (int VTSysEleAccount)
{
Set_Value ("VTSysEleAccount", VTSysEleAccount);
}
/** Get VTSysEleAccount.
@return VTSysEleAccount */
public int GetVTSysEleAccount() 
{
Object ii = Get_Value("VTSysEleAccount");
if (ii == null) return 0;
return Convert.ToInt32(ii);
}
/** Set VTSysEleAddress.
@param VTSysEleAddress VTSysEleAddress */
public void SetVTSysEleAddress (int VTSysEleAddress)
{
Set_Value ("VTSysEleAddress", VTSysEleAddress);
}
/** Get VTSysEleAddress.
@return VTSysEleAddress */
public int GetVTSysEleAddress() 
{
Object ii = Get_Value("VTSysEleAddress");
if (ii == null) return 0;
return Convert.ToInt32(ii);
}
/** Set VTSysEleAmount.
@param VTSysEleAmount VTSysEleAmount */
public void SetVTSysEleAmount (Decimal? VTSysEleAmount)
{
Set_Value ("VTSysEleAmount", (Decimal?)VTSysEleAmount);
}
/** Get VTSysEleAmount.
@return VTSysEleAmount */
public Decimal GetVTSysEleAmount() 
{
Object bd =Get_Value("VTSysEleAmount");
if (bd == null) return Envs.ZERO;
return  Convert.ToDecimal(bd);
}
/** Set VTSysEleAttribute.
@param VTSysEleAttribute VTSysEleAttribute */
public void SetVTSysEleAttribute (int VTSysEleAttribute)
{
Set_Value ("VTSysEleAttribute", VTSysEleAttribute);
}
/** Get VTSysEleAttribute.
@return VTSysEleAttribute */
public int GetVTSysEleAttribute() 
{
Object ii = Get_Value("VTSysEleAttribute");
if (ii == null) return 0;
return Convert.ToInt32(ii);
}
/** Set VTSysEleBinary.
@param VTSysEleBinary VTSysEleBinary */
public void SetVTSysEleBinary (Byte[] VTSysEleBinary)
{
Set_Value ("VTSysEleBinary", VTSysEleBinary);
}
/** Get VTSysEleBinary.
@return VTSysEleBinary */
public Byte[] GetVTSysEleBinary() 
{
return (Byte[])Get_Value("VTSysEleBinary");
}
/** Set VTSysEleCostPrice.
@param VTSysEleCostPrice VTSysEleCostPrice */
public void SetVTSysEleCostPrice (Decimal? VTSysEleCostPrice)
{
Set_Value ("VTSysEleCostPrice", (Decimal?)VTSysEleCostPrice);
}
/** Get VTSysEleCostPrice.
@return VTSysEleCostPrice */
public Decimal GetVTSysEleCostPrice() 
{
Object bd =Get_Value("VTSysEleCostPrice");
if (bd == null) return Envs.ZERO;
return  Convert.ToDecimal(bd);
}
/** Set VTSysEleDate.
@param VTSysEleDate VTSysEleDate */
public void SetVTSysEleDate (DateTime? VTSysEleDate)
{
Set_Value ("VTSysEleDate", (DateTime?)VTSysEleDate);
}
/** Get VTSysEleDate.
@return VTSysEleDate */
public DateTime? GetVTSysEleDate() 
{
return (DateTime?)Get_Value("VTSysEleDate");
}
/** Set VTSysEleDateTime.
@param VTSysEleDateTime VTSysEleDateTime */
public void SetVTSysEleDateTime (DateTime? VTSysEleDateTime)
{
Set_Value ("VTSysEleDateTime", (DateTime?)VTSysEleDateTime);
}
/** Get VTSysEleDateTime.
@return VTSysEleDateTime */
public DateTime? GetVTSysEleDateTime() 
{
return (DateTime?)Get_Value("VTSysEleDateTime");
}
/** Set VTSysEleFileName.
@param VTSysEleFileName VTSysEleFileName */
public void SetVTSysEleFileName (String VTSysEleFileName)
{
if (VTSysEleFileName != null && VTSysEleFileName.Length > 50)
{
log.Warning("Length > 50 - truncated");
VTSysEleFileName = VTSysEleFileName.Substring(0,50);
}
Set_Value ("VTSysEleFileName", VTSysEleFileName);
}
/** Get VTSysEleFileName.
@return VTSysEleFileName */
public String GetVTSysEleFileName() 
{
return (String)Get_Value("VTSysEleFileName");
}
/** Set VTSysEleFilePath.
@param VTSysEleFilePath VTSysEleFilePath */
public void SetVTSysEleFilePath (String VTSysEleFilePath)
{
if (VTSysEleFilePath != null && VTSysEleFilePath.Length > 50)
{
log.Warning("Length > 50 - truncated");
VTSysEleFilePath = VTSysEleFilePath.Substring(0,50);
}
Set_Value ("VTSysEleFilePath", VTSysEleFilePath);
}
/** Get VTSysEleFilePath.
@return VTSysEleFilePath */
public String GetVTSysEleFilePath() 
{
return (String)Get_Value("VTSysEleFilePath");
}
/** Set VTSysEleImage.
@param VTSysEleImage VTSysEleImage */
public void SetVTSysEleImage (int VTSysEleImage)
{
Set_Value ("VTSysEleImage", VTSysEleImage);
}
/** Get VTSysEleImage.
@return VTSysEleImage */
public int GetVTSysEleImage() 
{
Object ii = Get_Value("VTSysEleImage");
if (ii == null) return 0;
return Convert.ToInt32(ii);
}
/** Set VTSysEleInteger.
@param VTSysEleInteger VTSysEleInteger */
public void SetVTSysEleInteger (int VTSysEleInteger)
{
Set_Value ("VTSysEleInteger", VTSysEleInteger);
}
/** Get VTSysEleInteger.
@return VTSysEleInteger */
public int GetVTSysEleInteger() 
{
Object ii = Get_Value("VTSysEleInteger");
if (ii == null) return 0;
return Convert.ToInt32(ii);
}

/** VTSysEleList AD_Reference_ID=425 */
public static int VTSYSELELIST_AD_Reference_ID=425;
/** Always = A */
public static String VTSYSELELIST_Always = "A";
/** Only if NULL = N */
public static String VTSYSELELIST_OnlyIfNULL = "N";
/** Only if NOT NULL = X */
public static String VTSYSELELIST_OnlyIfNOTNULL = "X";
/** Is test a valid value.
@param test testvalue
@returns true if valid **/
public bool IsVTSysEleListValid (String test)
{
return test == null || test.Equals("A") || test.Equals("N") || test.Equals("X");
}
/** Set VTSysEleList.
@param VTSysEleList VTSysEleList */
public void SetVTSysEleList (String VTSysEleList)
{
if (!IsVTSysEleListValid(VTSysEleList))
throw new ArgumentException ("VTSysEleList Invalid value - " + VTSysEleList + " - Reference_ID=425 - A - N - X");
if (VTSysEleList != null && VTSysEleList.Length > 1)
{
log.Warning("Length > 1 - truncated");
VTSysEleList = VTSysEleList.Substring(0,1);
}
Set_Value ("VTSysEleList", VTSysEleList);
}
/** Get VTSysEleList.
@return VTSysEleList */
public String GetVTSysEleList() 
{
return (String)Get_Value("VTSysEleList");
}
/** Set VTSysEleLocation.
@param VTSysEleLocation VTSysEleLocation */
public void SetVTSysEleLocation (int VTSysEleLocation)
{
Set_Value ("VTSysEleLocation", VTSysEleLocation);
}
/** Get VTSysEleLocation.
@return VTSysEleLocation */
public int GetVTSysEleLocation() 
{
Object ii = Get_Value("VTSysEleLocation");
if (ii == null) return 0;
return Convert.ToInt32(ii);
}
/** Set VTSysEleLocator.
@param VTSysEleLocator VTSysEleLocator */
public void SetVTSysEleLocator (int VTSysEleLocator)
{
Set_Value ("VTSysEleLocator", VTSysEleLocator);
}
/** Get VTSysEleLocator.
@return VTSysEleLocator */
public int GetVTSysEleLocator() 
{
Object ii = Get_Value("VTSysEleLocator");
if (ii == null) return 0;
return Convert.ToInt32(ii);
}
/** Set VTSysEleMemo.
@param VTSysEleMemo VTSysEleMemo */
public void SetVTSysEleMemo (String VTSysEleMemo)
{
if (VTSysEleMemo != null && VTSysEleMemo.Length > 50)
{
log.Warning("Length > 50 - truncated");
VTSysEleMemo = VTSysEleMemo.Substring(0,50);
}
Set_Value ("VTSysEleMemo", VTSysEleMemo);
}
/** Get VTSysEleMemo.
@return VTSysEleMemo */
public String GetVTSysEleMemo() 
{
return (String)Get_Value("VTSysEleMemo");
}
/** Set VTSysEleNumber.
@param VTSysEleNumber VTSysEleNumber */
public void SetVTSysEleNumber (Decimal? VTSysEleNumber)
{
Set_Value ("VTSysEleNumber", (Decimal?)VTSysEleNumber);
}
/** Get VTSysEleNumber.
@return VTSysEleNumber */
public Decimal GetVTSysEleNumber() 
{
Object bd =Get_Value("VTSysEleNumber");
if (bd == null) return Envs.ZERO;
return  Convert.ToDecimal(bd);
}

/** VTSysEleProcess AD_Reference_ID=365 */
public static int VTSYSELEPROCESS_AD_Reference_ID=365;
/** Client (all shared) = C */
public static String VTSYSELEPROCESS_ClientAllShared = "C";
/** Org (not shared) = O */
public static String VTSYSELEPROCESS_OrgNotShared = "O";
/** Client or Org = x */
public static String VTSYSELEPROCESS_ClientOrOrg = "x";
/** Is test a valid value.
@param test testvalue
@returns true if valid **/
public bool IsVTSysEleProcessValid (String test)
{
return test == null || test.Equals("C") || test.Equals("O") || test.Equals("x");
}
/** Set VTSysEleProcess.
@param VTSysEleProcess VTSysEleProcess */
public void SetVTSysEleProcess (String VTSysEleProcess)
{
if (!IsVTSysEleProcessValid(VTSysEleProcess))
throw new ArgumentException ("VTSysEleProcess Invalid value - " + VTSysEleProcess + " - Reference_ID=365 - C - O - x");
if (VTSysEleProcess != null && VTSysEleProcess.Length > 50)
{
log.Warning("Length > 50 - truncated");
VTSysEleProcess = VTSysEleProcess.Substring(0,50);
}
Set_Value ("VTSysEleProcess", VTSysEleProcess);
}
/** Get VTSysEleProcess.
@return VTSysEleProcess */
public String GetVTSysEleProcess() 
{
return (String)Get_Value("VTSysEleProcess");
}

/** VTSysEleSearch AD_Reference_ID=244 */
public static int VTSYSELESEARCH_AD_Reference_ID=244;
/** Set VTSysEleSearch.
@param VTSysEleSearch VTSysEleSearch */
public void SetVTSysEleSearch (int VTSysEleSearch)
{
Set_Value ("VTSysEleSearch", VTSysEleSearch);
}
/** Get VTSysEleSearch.
@return VTSysEleSearch */
public int GetVTSysEleSearch() 
{
Object ii = Get_Value("VTSysEleSearch");
if (ii == null) return 0;
return Convert.ToInt32(ii);
}
/** Set VTSysEleText.
@param VTSysEleText VTSysEleText */
public void SetVTSysEleText (String VTSysEleText)
{
if (VTSysEleText != null && VTSysEleText.Length > 50)
{
log.Warning("Length > 50 - truncated");
VTSysEleText = VTSysEleText.Substring(0,50);
}
Set_Value ("VTSysEleText", VTSysEleText);
}
/** Get VTSysEleText.
@return VTSysEleText */
public String GetVTSysEleText() 
{
return (String)Get_Value("VTSysEleText");
}
/** Set VTSysEleUrl.
@param VTSysEleUrl VTSysEleUrl */
public void SetVTSysEleUrl (String VTSysEleUrl)
{
if (VTSysEleUrl != null && VTSysEleUrl.Length > 50)
{
log.Warning("Length > 50 - truncated");
VTSysEleUrl = VTSysEleUrl.Substring(0,50);
}
Set_Value ("VTSysEleUrl", VTSysEleUrl);
}
/** Get VTSysEleUrl.
@return VTSysEleUrl */
public String GetVTSysEleUrl() 
{
return (String)Get_Value("VTSysEleUrl");
}

/** VTSysEleWrokFlow AD_Reference_ID=270 */
public static int VTSYSELEWROKFLOW_AD_Reference_ID=270;
/** Expense type = E */
public static String VTSYSELEWROKFLOW_ExpenseType = "E";
/** Item = I */
public static String VTSYSELEWROKFLOW_Item = "I";
/** Online = O */
public static String VTSYSELEWROKFLOW_Online = "O";
/** Resource = R */
public static String VTSYSELEWROKFLOW_Resource = "R";
/** Service = S */
public static String VTSYSELEWROKFLOW_Service = "S";
/** Is test a valid value.
@param test testvalue
@returns true if valid **/
public bool IsVTSysEleWrokFlowValid (String test)
{
return test == null || test.Equals("E") || test.Equals("I") || test.Equals("O") || test.Equals("R") || test.Equals("S");
}
/** Set VTSysEleWrokFlow.
@param VTSysEleWrokFlow VTSysEleWrokFlow */
public void SetVTSysEleWrokFlow (String VTSysEleWrokFlow)
{
if (!IsVTSysEleWrokFlowValid(VTSysEleWrokFlow))
throw new ArgumentException ("VTSysEleWrokFlow Invalid value - " + VTSysEleWrokFlow + " - Reference_ID=270 - E - I - O - R - S");
if (VTSysEleWrokFlow != null && VTSysEleWrokFlow.Length > 50)
{
log.Warning("Length > 50 - truncated");
VTSysEleWrokFlow = VTSysEleWrokFlow.Substring(0,50);
}
Set_Value ("VTSysEleWrokFlow", VTSysEleWrokFlow);
}
/** Get VTSysEleWrokFlow.
@return VTSysEleWrokFlow */
public String GetVTSysEleWrokFlow() 
{
return (String)Get_Value("VTSysEleWrokFlow");
}
/** Set VTSysEleYesNo.
@param VTSysEleYesNo VTSysEleYesNo */
public void SetVTSysEleYesNo (Boolean VTSysEleYesNo)
{
Set_Value ("VTSysEleYesNo", VTSysEleYesNo);
}
/** Get VTSysEleYesNo.
@return VTSysEleYesNo */
public Boolean IsVTSysEleYesNo() 
{
Object oo = Get_Value("VTSysEleYesNo");
if (oo != null) 
{
 if (oo.GetType() == typeof(bool)) return Convert.ToBoolean(oo);
 return "Y".Equals(oo);
}
return false;
}
/** Set VTTable_ID.
@param VTTable_ID VTTable_ID */
public void SetVTTable_ID (int VTTable_ID)
{
if (VTTable_ID < 1) throw new ArgumentException ("VTTable_ID is mandatory.");
Set_ValueNoCheck ("VTTable_ID", VTTable_ID);
}
/** Get VTTable_ID.
@return VTTable_ID */
public int GetVTTable_ID() 
{
Object ii = Get_Value("VTTable_ID");
if (ii == null) return 0;
return Convert.ToInt32(ii);
}
}

}
